import {createStore} from "redux";
//利用createstore创建一个store
//调用createstore时需要传入一个参数,这个参数就是reducer
//reducer是给dispatch派发任务的通过action的type值
const install = {
    count : 0
}

export const store = createStore( (state = install ,aciton) => {
    switch (aciton.type){
        case 'ADD' :
            return {
                count : state.count+1
            }
        default :
            return state;
    }
} )